package ift605.EquationWithTrainingAgents.behavior.special;

import java.util.List;

import ift605.EquationWithTrainingAgents.behavior.common.DeriverBehavior;
import ift605.EquationWithTrainingAgents.struct.DerivationInfo;
import udes.ds.agent.Constant;
import udes.ds.agent.MultiplicativeEquation;
import udes.ds.agent.SummativeEquation;

public class SubstractDerivedEquationToBaseBehavior extends DeriverBehavior {
	private static final long serialVersionUID = 1L;

	//TODO delete this behavior, it can be done otherwise (it's a duplicate)
	@Override
	public boolean derive(List<DerivationInfo> aDerivationInfos) {
		aDerivationInfos.get(0).Mess.derived = new SummativeEquation(aDerivationInfos.get(0).Mess.base, new MultiplicativeEquation(new Constant(-1), aDerivationInfos.get(0).Mess.derived));
		return true;
	}
}